import React, { Component } from 'react'
import { connect } from "react-redux"
import * as action from "../action/index.js"
import { bindActionCreators } from "redux"
 class Dirlog1 extends Component {
    cannal() { // 弹窗取消得方法

        this.props.isShowFn(false)
    }
    delson () { // 当我点击删除去删除
        this.props.delshan(this.props.ind)
        this.props.isShowFn(false)
    }
  render() {
    console.log(this.props.isshow,3333)
    return (
    <div>
          {
          this.props.isshow? <div className='dirlog1'>
          <p>您确定要删除吗？</p>
          <p><button onClick={this.delson.bind(this)}>确定</button>
            <button onClick={this.cannal.bind(this)}>取消</button>
          </p>
      </div>:""
      }
    </div>
    
     
    )
  }
}
let mapStateToprops = (state) => {
    return {
        ...state.ShopReduer
    }
}
let mapDisPatchToProps = (dispatch) => bindActionCreators(action, dispatch)
export default  connect(mapStateToprops, mapDisPatchToProps)(Dirlog1) 